/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package transformer;

/**
 *
 * @author Rishav
 */
public class Evaluate {
    public static String evaluate(String func, String data, String arg) throws ClassNotFoundException, InstantiationException, IllegalAccessException{
        Class c = Class.forName("transformer."+func);
        Transformer t=(Transformer) c.newInstance();
        t.setData(data);
        return t.evaluate(arg.split("~"));
    }
}
